POV-Ray : Newsgroups : povray.newusers : Macro Woes : Re: Macro Woes Server Time
5 Sep 2024 20:18:00 EDT (-0400)
  Re: Macro Woes  
From: Jon A  Cruz
Date: 30 Sep 1999 02:28:49
Message: <37F30333.63C38A41@geocities.com>
Ian Burgmyer wrote:

> I'm having serious problem with macros.  As most of you probably know, I
> released an image from the output of my Sphere Spreader 2000.  It created a
> sphere in the center with smaller ones going out in four directions.  Sorta.
> You'll have to see it, it's on p.b.i.
>
> Anyways, to my problem.  I am trying to have it rotate on every iteration.
> However, not without serious problems.  Every time I compile my source (at
> the bottom of this message) I get the following error:
>

[SNIP]

> object { SphereMacro(15, 1, 1.5, 10)

That's the problem line. To my well trained programmer's eye (he he he, yeah
right) it is immediately appearent that something is amiss.

For proper coding & indention, it should look like this:

  object {
    SphereMacro(15, 1, 1.5, 10)
  }

Notice the lack of a closing parenthesis on your code? That's the give-away.
Now, we go back up where SphereMacro is defined and see...

yes. It's a macro, not a #declare.

Just change to this and all is well:

SphereMacro(15, 1, 1.5, 10)

No more 'object' needed.

Or, if you really want to use 'object', then just

#delcare anInstance = SphereMacro(15, 1, 1.5, 10)
object {
  anInstance
}


--
"My new computer's got the clocks, it rocks
But it was obsolete before I opened the box" - W.A.Y.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.